#include <stdio.h>
void main()
{
    static char*a[][10]=
    {
    "","I","II","III","IV","V","VI","VII","VIII","IX","",
    "X","XX","XXX","XL","L","LX","LXX","LXXX","XCC",
    "","C","CC","CCC","CD","D","DC","DCC","DCCC","CM"
    };
    
    int n,t,i,m;
    printf("PLease enter number :");
    scanf("%D",&n);
    for(m=0,i=1000;m<3;m++,i/=10){
        t=(n%10)/(i/10);
        printf("%s",a[2-m][t]);
    }
    printf("\n");
    
}
